package com.hx.setting.entity;

import java.io.Serializable;
import java.util.Date;
import org.json.JSONObject;

/**
 * Generate Date : 2014-03-16
 * Generate Version : v3.0
 * Generate Name : Honey v3.1 Test
 * Generate User : THINK
 * JDK Version : 1.5
 */
public class UsersEntityWithBLOBs extends UsersEntity implements Serializable
{

	/** 类序列化版本标识 */
	private static final long	serialVersionUID	= 174189307171406607L;

	/** description */
	private String				description;

	/** signature */
	private String				signature;

	/** userPreferences */
	private String				userPreferences;

	/** 
	 * 默认构造函数
	 */
	public UsersEntityWithBLOBs()
	{
		super();
	}

	/** 
	 * 带参数构造函数
	 */
	public UsersEntityWithBLOBs(Long id/*主键 */, String userName/*userName*/, String userPassword/*userPassword*/, String firstName/*firstName */,
			String lastName/*lastName */, String reportsToId/*reportsToId */, String isAdmin/*isAdmin */, String description/*description */,
			Date dateEntered/*dateEntered */, Date dateModified/*dateModified */, String modifiedUserId/*modifiedUserId */, String position/*position */,
			String department/*department */, String phoneHome/*phoneHome */, String phoneMobile/*phoneMobile */, String phoneWork/*phoneWork */,
			String phoneOther/*phoneOther */, String phoneFax/*phoneFax */, String email1/*email1 */, String email2/*email2 */, String status/*status */,
			String signature/*signature */, String addressStreet/*addressStreet */, String addressCity/*addressCity */, String addressState/*addressState */,
			String addressCountry/*addressCountry */, String addressPostalcode/*addressPostalcode */, String userPreferences/*userPreferences */,
			Integer weekstart/*weekstart */, String dateFormat/*dateFormat */, String hourFormat/*hourFormat */, String startHour/*startHour */, String endHour/*endHour */,
			String activityView/*This view, Today, this month, this year */, String leadView/*Today, Last 2 days, Last week, leads infomation item shows. */,
			String imagename/*imagename */, Integer deleted/*deleted */, String confirmPassword/*confirmPassword*/, String internalMailer/*internalMailer */,
			String reminderInterval/*提醒间隔 */, String reminderNextTime/*下次提醒时间 */, String cryptType/*cryptType */, String accesskey/*accesskey */, String theme/*theme */,
			String language/*language */, String timeZone/*timeZone */, String currencyGroupingPattern/*currencyGroupingPattern */,
			String currencyDecimalSeparator/*currencyDecimalSeparator */, String currencyGroupingSeparator/*currencyGroupingSeparator */,
			String currencySymbolPlacement/*currencySymbolPlacement */, String noOfCurrencyDecimals/*noOfCurrencyDecimals */)
	{
		//父类构造函数
		super( id/*主键 */
		, userName/*userName*/
		, userPassword/*userPassword*/
		, firstName/*firstName */
		, lastName/*lastName */
		, reportsToId/*reportsToId */
		, isAdmin/*isAdmin */
		, dateEntered/*dateEntered */
		, dateModified/*dateModified */
		, modifiedUserId/*modifiedUserId */
		, position/*position */
		, department/*department */
		, phoneHome/*phoneHome */
		, phoneMobile/*phoneMobile */
		, phoneWork/*phoneWork */
		, phoneOther/*phoneOther */
		, phoneFax/*phoneFax */
		, email1/*email1 */
		, email2/*email2 */
		, status/*status */
		, addressStreet/*addressStreet */
		, addressCity/*addressCity */
		, addressState/*addressState */
		, addressCountry/*addressCountry */
		, addressPostalcode/*addressPostalcode */
		, weekstart/*weekstart */
		, dateFormat/*dateFormat */
		, hourFormat/*hourFormat */
		, startHour/*startHour */
		, endHour/*endHour */
		, activityView/*This view, Today, this month, this year */
		, leadView/*Today, Last 2 days, Last week, leads infomation item shows. */
		, imagename/*imagename */
		, deleted/*deleted */
		, confirmPassword/*confirmPassword*/
		, internalMailer/*internalMailer */
		, reminderInterval/*提醒间隔 */
		, reminderNextTime/*下次提醒时间 */
		, cryptType/*cryptType */
		, accesskey/*accesskey */
		, theme/*theme */
		, language/*language */
		, timeZone/*timeZone */
		, currencyGroupingPattern/*currencyGroupingPattern */
		, currencyDecimalSeparator/*currencyDecimalSeparator */
		, currencyGroupingSeparator/*currencyGroupingSeparator */
		, currencySymbolPlacement/*currencySymbolPlacement */
		, noOfCurrencyDecimals/*noOfCurrencyDecimals */
		);
		this.setDescription( description );//description 
		this.setSignature( signature );//signature 
		this.setUserPreferences( userPreferences );//userPreferences;
	}

	/** 
	 * 获取description
	 * @return description
	 */
	public final String getDescription()
	{
		return this.description;
	}

	/** 
	 * 设定description
	 * @param description
	 * @return 返回自身
	 */
	public final UsersEntity setDescription(String description)
	{
		this.description = description;
		if ( this.description != null && this.description.length() == 0 ) this.description = null;
		return this;
	}

	/** 
	 * 获取signature
	 * @return signature
	 */
	public final String getSignature()
	{
		return this.signature;
	}

	/** 
	 * 设定signature
	 * @param signature
	 * @return 返回自身
	 */
	public final UsersEntity setSignature(String signature)
	{
		this.signature = signature;
		if ( this.signature != null && this.signature.length() == 0 ) this.signature = null;
		return this;
	}

	/** 
	 * 获取userPreferences
	 * @return userPreferences
	 */
	public final String getUserPreferences()
	{
		return this.userPreferences;
	}

	/** 
	 * 设定userPreferences
	 * @param userPreferences
	 * @return 返回自身
	 */
	public final UsersEntity setUserPreferences(String userPreferences)
	{
		this.userPreferences = userPreferences;
		if ( this.userPreferences != null && this.userPreferences.length() == 0 ) this.userPreferences = null;
		return this;
	}

	@Override
	public int hashCode()
	{
		int answer = -1;
		String solt = "&pET{";//随机盐
		answer = new StringBuilder()
				.append( "UsersEntityWithBLOBs" )
				.append( super.hashCode() )
				.append( this.description )
				.append( this.signature )
				.append( this.userPreferences )
				.append( solt )
				.toString()
				.hashCode();
		return answer;
	}

	@Override
	public String toString()
	{
		return new StringBuilder()
				.append( super.toString() )
				.append( "\nUsersEntityWithBLOBs : [" )
				.append( "    description : " )
				.append( this.description )
				.append( "    signature : " )
				.append( this.signature )
				.append( "    userPreferences : " )
				.append( this.userPreferences )
				.append( "]\n" )
				.toString();
	}

	public JSONObject toJsonObject()
	{
		JSONObject answer = super.toJsonObject();
		answer.put( "description" ,description == null ? "" : description );
		answer.put( "signature" ,signature == null ? "" : signature );
		answer.put( "userPreferences" ,userPreferences == null ? "" : userPreferences );
		return answer;
	}

	public String toXml()
	{
		StringBuilder answer = new StringBuilder();
		String superxmpl = super.toXml();
		int endindex = superxmpl.lastIndexOf( '<' );
		answer.append( superxmpl.substring( 0 ,endindex ) );
		answer.append( "  <description>" ).append( description == null ? "" : description ).append( "</description>\n" );
		answer.append( "  <signature>" ).append( signature == null ? "" : signature ).append( "</signature>\n" );
		answer.append( "  <userPreferences>" ).append( userPreferences == null ? "" : userPreferences ).append( "</userPreferences>\n" );
		answer.append( superxmpl.substring( endindex ) );
		return answer.toString();
	}
}
/* Honey v3.1 Test - version:4 - OriginalChecksum:B5a3ba8e23cdb5f091357b0eefc416282 (do not edit this line) */
